Repository navigation
fix(plugin-api): 补齐原生工作流计划校验与 SDK 回归 - #194
Merged
Merged
Conversation
35 of 40 tasks
xiaoyumuxi
marked this pull request as ready for review
November 24, 2026 04:15
This was referenced Nov 28, 2026
xiaoyumuxi
added a commit
that referenced
this pull request
Nov 29, 2026
* docs(plugins): 协议更新记录把已合入的 PR 移进时间线并回填日期(#222) “待合入”一节的 20 条记录(含 #224)对应的 PR 都已合入 main,按 UTC 合入日期改成时间线表格行,原文逐句保留,只删去“合入日期在合并时补齐” 之类的占位句;#193 已在时间线里,删去重复的待合入条目。新增 2026-11-24、 2026-11-22 两个日期分组。 - 回填“按协议查首次出现”的市场增量索引 schemaVersion 0(#187)、 toolchainProviders 1 与 litheToolchains 1(#182),以及“宿主方法 (按 API 编号)”里 #194、#190、#183、#151 的 18 个方法日期。 - 补录改了契约却没有登记的 #177、#117、#26。 - #207 的修改人按 PR 作者改为 devin-ai-integration[bot]。 - 时间线表头和维护说明统一用“改动”;转义 #133 行内代码里的竖线, 避免表格多出一列。 * docs(plugins): 已有宿主方法加字段也在方法表补行,统一方法表写法(#222) “宿主方法(按 API 编号)”表给 5 个 PR 补了 13 行,都是给已有方法或通知加字段、改校验时漏登记的: - #151:workspace/listContexts、workspace/getContext(authority 新增 platform),functions/invoke(转发远程工作区上下文的调用) - #184:API-11 的 7 个方法(路由前严格校验参数;workspace/create 的 kind 新增 symlink 与 linkTarget) - #188:editor/registerProviders(新增 colorDecorations) - #198:editor/registerActions(actionIcons 新增 4 个导航图标 token) - #224:agents/didPrompt(有附件时带 attachments) 统一写法:方法列只写方法名,补了什么写在协议列的括号里(#193 的 openHTML、openExternal,#23、#128 的 run/start,#128 的 prepareRun);同一个方法的各行排在一起,首次记录在前。 表格说明、维护第 3 步和 API PR 提交指南第 4 步写明:给已有方法或通知加参数、返回字段或取值,或改执行、校验行为,都在索引另加一行;API 总表不加行,用途、权限或协议变了就改原来那一行。
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
关联 Issue:Refs 1lck/Lithe-IDEA#2371
前置改动:#193(已合入)
类型:fix
问题与结果
#193 提供了通用输入、预览、输出、进度等接口。桌面接线时发现,原生操作计划还缺少清单命令归属和资源类型校验;省略预览模式及浏览器未保存策略时,计划没有显式返回契约规定的默认值。本 PR 在 Core 完成这些规则,使桌面收到可以直接执行的计划。
同时修复 #193 的两处 CI 问题:内核命令总表遗漏
plugins.workflow,Rust SDK 新类型位于测试模块之后触发items_after_test_module。SDK e2e 那次 Temurin 8 下载解压失败属于基础设施下载问题,本地四语端到端全部通过,没有为此修改工作流。改动
plugins.workflow/prepare接收经过验证的调用会话清单。状态项的commandID只允许引用该清单自己的命令。unsupportedOption。editorAndPreview;浏览器资源默认requireSaved,显式openSavedFile保留。statusBar/setItempreview/openMarkdownpreview/openHTMLbrowser/openExternal兼容、归属与日志
不新增方法、通知、权限、自定义错误码或任何系统版本。复用
plugin.host.invalidParams、plugin.host.unsupportedOption,没有改动既有编号。manifest是宿主内部 Core 命令的可选输入,不是插件请求字段;使用命令的状态项需要宿主提供真实调用会话清单。四个 SDK 的公共调用形状保持不变。规则、默认值和错误分类在 Core;桌面只执行原生 I/O 与呈现。真实插件业务及其测试留在插件仓库。本 PR 用合成输入和共享 fixture,不依赖具体插件或本机插件检出。
失败由现有 Core 请求分发轨迹和宿主方法处理边界记录,不新增旁路日志,不记录输入内容、HTTP URL/头/正文或凭据。未在原生应用日志窗口验收;该项由桌面接线 PR 如实记录。
验证
macOS 实际执行:
cargo test --manifest-path rust/Cargo.toml -p lithe-plugin-rpc -p lithe-plugin-ui -p lithe-project --lib:158 项通过。cargo test --manifest-path rust/Cargo.toml -p lithe-core --lib api_command_table_lists_exactly_the_parsed_commands:通过,修复前 CI 日志明确失败。cargo test --manifest-path rust/Cargo.toml -p lithe-plugin-rpc workflow::tests:5 项通过;新增原生计划测试保留、临时移除修复规则时实际失败,恢复后通过。cargo fmt --check、受影响 cratecargo clippy --all-targets -- -D warnings:通过。cargo clippy --all-targets -- -D warnings:通过。node shared/plugins/scripts/sdk-e2e.mjs:16 项通过。CARGO_TARGET_DIR="$PWD/rust/target" ./scripts/rust-core/verify-rust-core-comments.sh plugin-rpc plugin-ui project、node scripts/rust-core/verify-platform-tests.mjs、node shared/plugins/scripts/verify-docs.mjs:通过。按任务范围仅做 macOS 本地验证;Windows 验收未执行。无新插件、无发布、无自动合并。